.umap-main-edit-toolbox [type=button] {
    color: #fff;
    font-size: 0.8rem;
    background-color: var(--color-darkGray);
    width: auto;
    margin-bottom: 0;
    min-height: initial;
}

.umap-main-edit-toolbox [type=button]:hover {
    text-decoration: underline;
}

.leaflet-container [type=button].umap-help-link {
    padding: 0 var(--text-margin);
    background-color: inherit;
}

.leaflet-container .edit-undo {
    margin-left: var(--box-margin);
}

.leaflet-container .edit-undo[disabled],
.leaflet-container .edit-redo[disabled] {
    filter: invert(.5);
}

.umap-main-edit-toolbox .soft-round,
.umap-main-edit-toolbox .round {
    display: inline-block;
    height: 32px;
    line-height: 30px;
    padding: 0 20px;
}

.leaflet-container .connected-peers,
.dark [type=button].connected-peers:hover {
    background-color: var(--color-lightCyan);
    color: var(--color-dark);
}

.dark [type=button].connected-peers:hover {
    text-decoration: none;
    border: 0.5px solid var(--color-brightCyan);
}

.dark .off.connected-peers {
    background-color: var(--color-veryLightGray);
    color: var(--color-darkGray);
}

.leaflet-container .edit-disable:hover {
    border: 0.5px solid rgba(153, 153, 153, 0.80);
    text-decoration: none;
}

.leaflet-container .edit-save {
    opacity: 0.5;
    cursor: not-allowed;
    border-radius: 16px;
    border: 0.5px solid rgba(153, 153, 153, 0.40);
    background: rgba(153, 153, 153, 0.10);
}

.leaflet-container .icon-save {
    display: none;
}

.dark button.edit-save:hover {
    background: rgba(153, 153, 153, 0.10);
    text-decoration: none;
}

.umap-is-dirty .edit-save {
    opacity: 1;
    cursor: pointer;
    border: 0.5px solid rgba(66, 236, 230, 0.40);
    background: rgba(66, 236, 230, 0.10);
    color: var(--color-brightCyan);
}

.umap-is-dirty .icon-save {
    display: inline-block;
}

.umap-is-dirty .icon-save-disabled {
    display: none;
}

.umap-is-dirty .dark button.edit-save:hover {
    border-color: rgba(66, 236, 230, 0.80);
    background: rgba(66, 236, 230, 0.10);
}

.leaflet-container .edit-save,
.umap-edit-enabled .edit-enable {
    display: none;
}

.umap-edit-enabled .edit-save,
.umap-edit-enabled .edit-disable {
    display: inline-block;
}

.umap-caption-bar {
    display: none;
}

.umap-main-edit-toolbox {
    /* Show a transition from top to bottom when opening it */
    top: calc(var(--header-height) * -1);
    position: absolute;
    width: 100%;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding: 0 10px;
    text-align: start;
    line-height: var(--control-size);
    cursor: auto;
    border-bottom: 1px solid #222;
    z-index: var(--zindex-panels);
    display: flex;
    justify-content: space-between;
    background-color: var(--background-color);
    color: var(--text-color);
}

.umap-left-edit-toolbox,
.umap-right-edit-toolbox {
    display: flex;
    column-gap: 10px;
    align-items: center;
}

.umap-main-edit-toolbox .logo {
    width: 39px;
    height: 100%;
}

.umap-main-edit-toolbox .logo a {
    background-image: url('../img/logo_small.svg');
    background-position: 0 center;
    background-repeat: no-repeat;
    display: inline-block;
    width: 39px;
    height: 100%;
    vertical-align: middle;
    text-indent: -9999px;
}

.umap-main-edit-toolbox .map-name {
    font-weight: bold;
    text-align: start;
}

.truncate {
    display: inline-flex;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.umap-main-edit-toolbox .username {
    max-width: 100px;
}

.umap-main-edit-toolbox .share-status {
    font-style: italic;
}

.map-name:after {
    content: '\00a0';
    padding-inline-start: 3px;
    width: 1ch;
    display: inline-block;
}

.umap-is-dirty .map-name:after {
    content: '*';
}

.umap-edit-enabled .umap-main-edit-toolbox {
    top: 0;
}

.umap-caption-bar h3,
.umap-main-edit-toolbox h3 {
    display: inline;
}

.umap-caption-bar .umap-map-author {
    margin-inline-end: 10px;
}

.umap-caption-bar:has(select:not([hidden]))>button+button:after,
.umap-caption-bar>button+button:before {
    content: '|';
    padding-inline-start: 10px;
    padding-inline-end: 10px;
}

.umap-main-edit-toolbox .flat.umap-user:hover {
    text-decoration: none;
}

.umap-main-edit-toolbox .umap-user:after {
    content: '|';
    padding-inline-start: var(--text-margin);
    display: inline-block;
    /* Prevents underline on hover. */
}

.umap-caption-bar {
    display: none;
    height: var(--footer-height);
    background-color: #fff;
    width: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    padding: var(--gutter);
    text-align: start;
    line-height: 100%;
    cursor: auto;
    border-top: 1px solid var(--color-veryLightGray);
    opacity: 0.93;
    z-index: var(--zindex-panels);
}

.umap-caption-bar-enabled .umap-caption-bar {
    display: flex;
    align-items: baseline;
}

.umap-caption-bar select {
    margin-top: 0;
    line-height: initial;
    height: initial;
    min-height: initial;
    width: auto;
    padding: 0 var(--text-margin);
}

.umap-caption-bar-enabled {
    --current-footer-height: var(--footer-height);
}

.umap-edit-bar {
    position: absolute;
    right: var(--panel-gutter);
    display: none;
    top: calc(var(--current-header-height) + var(--panel-gutter));
    flex-direction: column;
    z-index: calc(var(--zindex-panels) - 1);
    width: var(--control-size);
    background-color: var(--background-color);
    border-radius: var(--border-radius);
}

.umap-edit-enabled .umap-edit-bar {
    display: flex;
}

.umap-edit-bar li {
    width: var(--control-size);
    height: var(--control-size);
}

.umap-edit-bar button[type="button"] {
    padding: 0;
    border-radius: 0;
}

.umap-edit-bar li:first-of-type button {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.umap-edit-bar li:last-of-type button {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.umap-edit-bar hr {
    padding: 0;
    margin: 0;
}

@media all and (max-width: 980px) {
    .umap-main-edit-toolbox button span {
        display: none;
    }
}

@media all and (max-width: 770px) {

    .umap-main-edit-toolbox .umap-help-link,
    .umap-main-edit-toolbox .share-status {
        display: none !important;
    }
}

@media all and (max-width: 480px) {
    .umap-main-edit-toolbox {
        flex-direction: column;
        padding: var(--small-box-padding);
    }

    .umap-main-edit-toolbox>div {
        justify-content: center;
    }

    .umap-main-edit-toolbox .share-status {
        display: none;
    }

    .umap-main-edit-toolbox .map-name {
        max-width: 100px;
    }
}
